package com.qidian.mes.cal.controller;

import com.qidian.mes.cal.service.CalTeamMemberService;
import com.qidian.mes.pojo.CalTeam;
import com.qidian.mes.pojo.CalTeamMember;
import com.qidian.mes.util.pojo.MESResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author zhangYu
 * @Company 起点编程
 * @Time 2023/10/27 10:14
 * @Description
 */
@RestController
@CrossOrigin
@RequestMapping("/calTeamMember")
public class CalTeamMemberController {

    @Autowired
    CalTeamMemberService calTeamMemberService;

    @GetMapping("/get")
    public MESResult get(Long memberId){
        return calTeamMemberService.get(memberId);
    }
    @GetMapping("/list")
    public MESResult list(@RequestParam(defaultValue = "1")int page, @RequestParam(defaultValue = "10") int limit, CalTeamMember calTeamMember){
        return calTeamMemberService.list(page,limit,calTeamMember);
    }
    @PostMapping("/save")
    public MESResult save(CalTeamMember calTeamMember){
        return calTeamMemberService.save(calTeamMember   );
    }
}
